#include <cellcsp.h>
#include <string>
#include <stdio.h>
#include <stdlib.h>
#include <csp_debug.h>
#include "../../shared/mc_pi.h"
#include "StopWatch.h"


int main(){

	char *mc_pi_master = "sor_worker_process";
	char *mc_pi_slave  = "sor_init_process";

	char *mc_pi_slave_path = "./tasks/mc_pi_slave";
	char *mc_pi_master_path = "./tasks/mc_pi_master";


	CSPConfig conf;

	conf.add_csp_program(mc_pi_master_path, mc_pi_master);
	conf.add_csp_program(mc_pi_slave_path, mc_pi_slave);


	CellCSP_start(conf);


	Parallel par( new CSPProcess(mc_pi_master), NULL);
	for(int i=0; i < N; i++){
		par.Add(new CSPProcess(mc_pi_slave));
	}

	par.Run();

	CellCSP_end();

	return 0;
}
